package o;

import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.metadata.emsg.EventMessage;
import java.nio.ByteBuffer;
import java.util.Arrays;

public final class ahi implements ahd {
    public Metadata ˊ(ahg o_ahg) {
        ByteBuffer byteBuffer = o_ahg.ॱ;
        byte[] array = byteBuffer.array();
        int limit = byteBuffer.limit();
        anc o_anc = new anc(array, limit);
        String str = (String) amm.ॱ(o_anc.ˉ());
        String str2 = (String) amm.ॱ(o_anc.ˉ());
        long ˋॱ = o_anc.ˋॱ();
        long ˋॱ2 = o_anc.ˋॱ();
        if (ˋॱ2 != 0) {
            amz.ˏ("EventMessageDecoder", "Ignoring non-zero presentation_time_delta: " + ˋॱ2);
        }
        ˋॱ = anr.ॱ(o_anc.ˋॱ(), 1000, ˋॱ);
        long ˋॱ3 = o_anc.ˋॱ();
        array = Arrays.copyOfRange(array, o_anc.ˋ(), limit);
        return new Metadata(new EventMessage(str, str2, ˋॱ, ˋॱ3, array));
    }
}
